package com.pro.mybatis;

import java.util.List;

import com.pro.mybatis.Page;
/**
 * 
 * @author xutao
 *
 * @param <T>
 */
public class PageResult<T> {
	private int start = 0;
	private int count = 10;
	private int pageNo = 1;
	private int pageSize = 10;
	private Integer accountId;
	private List<T> dataList;
	private Integer total;
	private Page page;
	
	public Page getPage() {
		return page;
	}
	public void setPage(Page page) {
		this.page = page;
	}
	public Integer getTotal() {
		return total;
	}
	public void setTotal(Integer total) {
		this.total = total;
	}
	public List<T> getDataList() {
		return dataList;
	}
	public void setDataList(List<T> dataList) {
		this.dataList = dataList;
	}
	public Integer getAccountId() {
		return accountId;
	}
	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}
	public PageResult(int pageNo, Integer accountId) {
		super();
		this.pageNo = pageNo;
		this.accountId = accountId;
	}
	public PageResult() {
		super();
	}
	public PageResult(int pageNo) {
		this.pageNo = pageNo;
	}
	public int getStart() {
		return (pageNo-1)*pageSize;
//		return start;
	}
	public void setStart(int start) {
		this.start = start;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public int getPageNo() {
		return pageNo;
	}
	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	@Override
	public String toString() {
		return " limit "+start+","+count;
	}
}
